/**
 * 评论接口模块
 */
import request from '@/utils/request'
/**
 * 获取文章列表
 */
export function getComments(params) {
return request({
    method: 'GET',
    url: '/app/v1_0/comments',
    params: params
})
}
/**
 * 评论点赞
 */
export const addCommentLike = target => {
    return request({
        method: 'POST',
        url:  '/app/v1_0/article/likings',
        data: {
            target
        }
    })
} 
/**
 * 取消评论点赞
 */
export const deleteCommentLike = target => {
    return request({
        method: 'DELETE',
        url: `/app/v1_0/article/likings/${target}`
    })
}
/**
 * 添加评论或评论回复
 */
 export function addComment (data) {
    return request({
      method: 'POST',
      url: '/app/v1_0/comments',
      data
    })
  }